package com.neusoft.service;

import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;

import com.neusoft.bean.AdminInfoBean;
import com.neusoft.db.DBFactory;

public class AdminInfoService {

	/**
	 * 根据用户信息验证用户信息合法性
	 * 
	 * @param adminB
	 *            参数实体bean对象
	 * @return 查询结果集
	 */
	public List<AdminInfoBean> doAdminLogin(AdminInfoBean adminB) {
		// 返回值
		List<AdminInfoBean> lstAdminB = null;
		// sql语句
		String strSql = "select * from tbadmininfo where adminname=? and adminpsw=?";
		// 执行查询操作
		lstAdminB = DBFactory.getDBProviderNewInstance().query(strSql, new BeanListHandler<>(AdminInfoBean.class),
				adminB.getAdminName(), adminB.getAdminPsw());

		return lstAdminB;
	}
}
